<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{/public :: #public_head}"></head>
<body>
<div class="container">
    <div th:replace="~{/public :: #public_header}"></div>
    <div th:replace="~{/public :: #public_time}"></div>
    <div class="main">
        <div th:replace="~{/public :: #public_left(activeUri='category')}"></div>
        <div class="right">
            <table class="table-list">
                <tr class="tr-first">
                    <th>分类ID</th>
                    <th>分类名称</th>
                    <th>分类别名</th>
                    <th>创建用户</th>
                    <th>创建时间</th>
                    <th>更新时间</th>
                    <th>是否有效</th>
                    <th>操作</th>
                </tr>
                <tr th:each="category:${categories}" class="tr-list">
                    <td th:text="${category.id}"></td>
                    <td th:text="${category.categoryName}"></td>
                    <td th:text="${category.categoryAlisa}"></td>
                    <td th:text="${category.createUserName}"></td>
                    <td th:text="${#temporals.format(category.createTime, 'yyyy-MM-dd hh:MM:SS')}"></td>
                    <td th:text="${#temporals.format(category.updateTime, 'yyyy-MM-dd hh:MM:SS')}"></td>
                    <td th:text="${category.active == 1 ? '是' : '否'}">是</td>
                    <td>
                        <a th:attr="rev_uri=@{/admin/category/revoke/}+ ${category.id}" class="revoke">启用</a>
                        <a th:attr="del_uri=@{/admin/category/delete/}+ ${category.id}" href="#" class="delete">删除</a>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div class="zhezhao"></div>
    <div th:replace="~{/public :: #public_deleteForm}"></div>
    <div th:replace="~{/public :: #public_revokeForm}"></div>
    <div th:replace="~{/public :: #public_footer}"></div>
</div>
</body>
</html>